<div><label for="item_restaurant_id"><%= h "restaurant" %></label>
  <span id="select_restaurant" style="display: <%= h @restaurant ? 'none' : 'inline' %>">
    <%= collection_select(:item, :restaurant_id,
    Restaurant.find(:all, :order => 'name'), :id, :name) %>
    <span class="option-button">
      <%= link_to_remote 'new', {:update => :restaurant_form,
      :success => "$('new_restaurant').style.display = 'inline';
      $('select_restaurant').style.display = 'none'",
      :url => { :action => "new_restaurant"}} %>
    </span>
  </span>
  <span id="new_restaurant" style="display: <%= h @restaurant ? 'inline' : 'none' %>">
    <span class="option-button">
      <%= link_to_function 'select',
      "$('restaurant_form').innerHTML = '';"+
      "$('select_restaurant').style.display='inline';$('new_restaurant').style.display = 'none'"%>
    </span>
  </span>
</div>
<span id="restaurant_form">
  <%
  if @restaurant
  %>  
  <%= render :partial => 'restaurant_form' %>
  <%
  end
  %>
</span>
<br/>
